merchantService.$inject = ['$http'];
var urlBase = '/cv4Backend';

function merchantService($http) {
  return {
    findAllAliveMerchants: function (callback) {
       $http.get(urlBase + '/getMerchantByLogin').then(function(res){
          callback(res);
        }
      );
    },
    findMerchantByIcnum: function(icnum, callback) {
      $http.get(urlBase + '/getMerchantByIcnum/'+icnum).then(function(res){
        callback(res);
      })
    },
    findAds: function(callback) {
      $http.get(urlBase + '/findAds').then(function(res){
        callback(res);
      })
    }
  }

}
module.exports = merchantService;
